<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>react作业2</title>
    <script src="./node_modules/react/umd/react.development.js"></script>
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
</head>

<body>
    <div id="root"></div>
    <script>
// 3. 创建React元素
        /*
        * <div class='item'>
           <h2 class='title'>中奖列表</h2>
           <ul class='list'>
             <li>1. 张三</li>
             <li>2. 张三</li>
             <li>3. 张三</li>
           </ul>
        </div>
        */
       let item = React.createElement('div',{className:'item'},
       React.createElement('h2',{className:'title'},'中奖列表'),
       React.createElement('ul',{className:'list'},React.createElement('li',null,'1.张三'),
       React.createElement('li',null,'2.李四'),
       React.createElement('li',null,'3.王五')
       ))
       let root=ReactDOM.createRoot(document.getElementById('root'))
       root.render(item)
    </script>
</body>

</html>